class Solution:
    def all_subsets(self, my_set):
        def int_to_set(num):
            tmp_set, index = [], 0
            while num:
                if num & 1 == 1:
                    tmp_set.append(my_set[index])
                num >>= 1
                index += 1
            return tmp_set

        ans = []
        n = len(my_set)
        for i in range(1 << n):
            tmp_set = int_to_set(i)
            ans.append(tmp_set)
        return ans


my_set = ['a', 'b', 'c']
solution = Solution()
ans = solution.all_subsets(my_set)
print(ans)
